<div class="module-trade">
    <ol class="breadcrumb fn-clearfix">
        <li>网站维护</li>
        <li>算力奖励配置</li>
    </ol>
    <div class="panel panel-warning">
        <div class="panel-body">
            <form class="form-inline ui-form" role="form">
                <div class="form-group ui-input-select">
                    <label for="record-uid" class="control-label f-12">选择分配币种：</label>
                    <select class="form-control" ng-model="vm.addMoney.coinType" placeholder="请选择分配币种">
                        <option ng-bind:value="coin.value" ng-repeat="coin in coinList">{{coin.label}}</option>
                    </select>
                </div>
                <div class="form-group ui-input-select">
                    <label for="record-uid" class="control-label f-12">分配的币种个数：</label>
                    <input type="text" class="form-control " placeholder="请输入币种个数" ng-model="vm.addMoney.rewardNum" id="record-uid">
                </div>
                <div class="form-group">
                    <span class="description" style="font-size: 16px;"></span>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary" ng-click="vm.addType()">添加分配奖励</button>
                    
                </div>


            </form>
        </div>
    </div>

    <div class="ui-box">
        <table class="table table-striped table-hover table-bordered">
            <thead>
                <tr>
                    <th>奖励币种</th>
                    <th>奖励总个数</th>
                    <th>创建日期</th>
                    <th>创建者</th>
                    <th>发放操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="item in vm.list" ng-if="vm.isLoading === false && vm.list.length > 0">
                    <td>{{item.coinType}}</td>
                    <td>{{item.rewardNum}}</td>
                    <td>{{$root.moment(item.createTime - 0).utc().utcOffset($root.ZONE).format('YYYY-MM-DD HH:mm:ss')}}</td>
                    <td>{{item.updateId}}</td>
                    <td ng-class="{
                        greentradedetail:(item.status=='COMPLETED'),
                        redtradedetail:(item.status=='INIT')}">
                        {{item.status == 'INIT' ? '未发放' : '已发放'}}&emsp;&emsp;
                        <a href="javascript:;" ng-if="item.status == 'INIT'" ng-click="vm.upStatus(item)">点击发放</a>
                    </td>
                </tr>
                <tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.list.length === 0||vm.list===null)">
                    <td colspan="11">暂无数据</td>
                </tr>
                <tr class="ui-loading" ng-if="vm.isLoading === true">
                    <td colspan="11">正在加载，请稍候...</td>
                </tr>
            </tbody>
        </table>

        <div class="ui-pager-box" ng-if="vm.totalNum > 0">
            <ul uib-pagination previous-text="上一页" next-text="下一页" first-text="首页" last-text="尾页" total-items="vm.totalNum" ng-model="vm.condition.pageNo"
                max-size="5" items-per-page="vm.pageSize || 10" align="right" class="pagination" boundary-links="true" ng-change="vm.pageChanged()"
                rotate="false"></ul>
        </div>
    </div>
</div>